import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import top.greatxiaozou.pojo.Hello;

public class Mytest {

    @Test
    public void testHello() {
        ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");

        Hello hello1 = (Hello) context.getBean("hello");


        System.out.println(hello1);

        hello1.setStr("wdnmd!");

        Hello hello2 = (Hello) context.getBean("hello");

        System.out.println(hello2);
    }
}
